<template>
	<div>
		<h2>子组件111</h2>
		<el-button type="primary" @click="scf">子传父</el-button>
		<p>{{ name }}</p>
		<p>{{ key }}</p>
		<p>{{ indexaa }}</p>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				key: 'value'
			}
		},
		inject: ['indexaa'],
		methods: {
			scf() {
				this.$emit('fn', '子组件传过来的')
			}
		},
		props: {
			name: {
				type: String
			}
		}
	}
</script>

<style lang="scss" scoped></style>
